package router

import (
	"YingShop/controller"
	"YingShop/middleware"

	"github.com/gin-gonic/gin"
)

func ShopProductRouter(e *gin.Engine) {
	shopProductRouteGroup := e.Group("/product")
	shopProductRouteGroup.Use(middleware.LoginMiddleWare())
	shopProductRouteGroup.GET("/:productId", controller.ShopProductController{}.Get)
	shopProductRouteGroup.POST("", controller.ShopProductController{}.Post)
	// 单独定义列表查询页
	e.GET("/products", middleware.LoginMiddleWare(), controller.ShopProductController{}.GetProductList)
}
